<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>httpsRedirect</title>
    <style>
        .link {
            color:rgba(0, 0, 0, .85);
            font-size: 16px;
            font-family: "微软雅黑","楷体";
            transition: color .3s cubic-bezier(0.075, 0.82, 0.165, 1);
            outline: none;
            background-color: transparent;
            border: none;
            cursor: pointer;
        }
        .link:hover {
            color:#2396ef;
        }
    </style>
</head>
<body>
    <button type="button" id="linkButton" class="link">eveningwater</button>
    <script>
        const button = document.getElementById("linkButton");
        const httpsRedirect = () => {
            if(location.protocol !== 'https:'){
                location.replace("https://" + location.href.split('//')[1]);
            }
        }
        button.addEventListener('click',() => {
            httpsRedirect();
        })
    </script>
</body>
</html>